Skip to content

feat: add tags to all resources; feature flag to view tags as folders#9283

Draft
royendo wants to merge 20 commits intomainfrom
worktree-feat-project-dashboard-organization
Draft

feat: add tags to all resources; feature flag to view tags as folders#9283
royendo wants to merge 20 commits intomainfrom
worktree-feat-project-dashboard-organization

Conversation

@royendo
Copy link
Copy Markdown
Contributor

@royendo royendo commented Apr 22, 2026

https://rilldata.slack.com/archives/C01A9DYP013/p1776880953322839
https://www.loom.com/share/659cd4592c4b466b8c1f2be3cbbf34c6

  • Add tags field to all meta, for all resources
  • Render tag chips on each dashboard row in the project dashboards list
  • Add a tags filter dropdown to the left of search (OR semantics) on the project home page

As designed here: https://www.figma.com/design/JtG3sbaopjO0xQlyeCjmho/RILL-WIP?node-id=6861-325995&m=dev

Needs:
#9173 (done)

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

royendo and others added 10 commits April 22, 2026 14:32
…anization

- Add `tags` field to ExploreSpec and CanvasSpec protos and parsers
- Render tag chips on each dashboard row in the project dashboards list
- Add a tags filter dropdown to the left of search (OR semantics) on the project home page

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Tag filter is now stored in the `tags` query param (comma-separated), so the selection is shareable and survives navigating into a dashboard and back.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…zation

When `tagAsFolders` is enabled in rill.yaml:
- Dashboard list groups into collapsible tag folders; dashboards with
  multiple tags appear under each folder; untagged dashboards get an
  "Untagged" section
- Navigating into a dashboard from a folder carries ?tags=<tag> so back-
  navigation returns to the same folder context
- Breadcrumb gains a tag segment (> Tag > Dashboard) derived from the
  active ?tags= URL param; clicking it returns to the filtered list

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…order

- Tags dropdown is hidden when tagAsFolders is on (folders replace it)
- All tag folders share a single parent border+rounded container with
  divide-y separators instead of each folder having its own border

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The folder header already shows the tag, so the chips on each row are redundant.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…s is on

- Add depth:2 to visualization PathOptions so the tag segment in the breadcrumb
  does not leak into the dashboard URL path
- Hide tag pills in the composite cell whenever tagAsFolders is enabled, covering
  both the flat/home preview list and the folder grouped view

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…te syncs

The explore URL state system was replacing redirectUrl.search entirely when syncing
state, which stripped any non-explore params like ?tags= used for folder breadcrumb
context. Now unknown params are carried over when the URL is replaced.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Derive active tag from URL param, else the dashboard's primary tag, else "not-tagged" so the folder breadcrumb is always present on dashboard pages
- Render tag-level dropdown with per-tag submenus of dashboards ("^" lists tags, ">" expands to its dashboards)
- Sort dashboard-level dropdown by tag with group headers
- Use "not-tagged" as the untagged folder/URL key and handle it as a virtual tag in the list filter

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When a tag folder is active, the dashboard-level dropdown now lists only dashboards in that tag (instead of all dashboards grouped by every tag).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we will want to add tags to other resources in future? I'm wondering if we should make it a generic resource property (i.e. parse it generically for all YAML resources and store it in the ResourceMeta proto type)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handling is missing in the code for unified metrics and explores in parse_metrics_view.go

Comment thread runtime/parser/parse_explore.go Outdated
Comment thread runtime/parser/parse_canvas.go Outdated
@royendo
Copy link
Copy Markdown
Contributor Author

royendo commented Apr 23, 2026

Do you think we will want to add tags to other resources in future? I'm wondering if we should make it a generic

i would love that! this was more a poc than anything but if it looks good i can move forward with implementation of tags on all resources ;)

royendo added 4 commits April 23, 2026 14:17
…-dashboard-organization

# Conflicts:
#	web-admin/src/features/projects/status/resource-table/ProjectResources.svelte
#	web-admin/src/features/projects/status/tables/ProjectTables.svelte
@royendo royendo requested review from a team as code owners April 24, 2026 13:39
royendo added 2 commits April 24, 2026 15:06
Svelte couldn't resolve the dependency through the conditional spread,
so `filterGroups` ran with `availableTags` undefined and threw on
`.length`, crashing the component during hydration (SSR is disabled on
this page, so the crash produced a blank render).
@royendo royendo marked this pull request as draft April 25, 2026 14:45
@royendo royendo changed the title feat: add tags to explore and canvas dashboards for project-level organization feat: add tags to all resources; feature flag to view tags as folders Apr 27, 2026
royendo and others added 4 commits April 27, 2026 15:37
The merge of main left two `onFilterChange` definitions in the file —
the existing one (line 147, handles `type` and `tags`) and a partial
new one main introduced (line 191, only `type`). Drop the partial
duplicate; the existing handler already covers both keys.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Display the untagged virtual group as "Not Tagged" in the dashboard
  folder header and the breadcrumb dropdown. Add a sibling
  `UNTAGGED_LABEL` constant alongside `UNTAGGED_KEY`; the kebab-case
  key still flows through URLs / state / map keys, while the
  human-readable label only surfaces at the two display sites
  (`DashboardsTagFolder`, `ProjectHeader`).
- Add the `tags?: string[]` field to `V1ResourceMeta` in the
  Orval-generated `index.schemas.ts`. The proto and swagger already
  declare the field, but `index.schemas.ts` is not part of
  `make proto.generate` so it had not picked up this branch's new
  field, breaking svelte-check on `DashboardsTable.svelte`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants